package org.deltaset.meta.faces;

import java.io.Serializable;

/**
 *
 * @author dmakariev
 */
public class AttributeContext implements Serializable{
    
    private final String className;
    private final String viewName;
    private final String recordId;

    public AttributeContext(String className, String viewName, String recordId) {
        this.className = className;
        this.viewName = viewName;
        this.recordId = recordId;
    }

    public String getClassName() {
        return className;
    }

    public String getRecordId() {
        return recordId;
    }

    public String getViewName() {
        return viewName;
    }

    @Override
    public boolean equals(Object obj) {
        if (obj == null) {
            return false;
        }
        if (getClass() != obj.getClass()) {
            return false;
        }
        final AttributeContext other = (AttributeContext) obj;
        if ((this.className == null) ? (other.className != null) : !this.className.equals(other.className)) {
            return false;
        }
        if ((this.viewName == null) ? (other.viewName != null) : !this.viewName.equals(other.viewName)) {
            return false;
        }
        if ((this.recordId == null) ? (other.recordId != null) : !this.recordId.equals(other.recordId)) {
            return false;
        }
        return true;
    }

    @Override
    public int hashCode() {
        int hash = 5;
        hash = 41 * hash + (this.className != null ? this.className.hashCode() : 0);
        hash = 41 * hash + (this.viewName != null ? this.viewName.hashCode() : 0);
        hash = 41 * hash + (this.recordId != null ? this.recordId.hashCode() : 0);
        return hash;
    }
           
    
}
